package com.relatev.minecraft.TRMExample.listener;

import com.relatev.minecraft.TRMobAPI.Event.TRMobSpawnOverEvent;
import org.bukkit.entity.Zombie;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;

public class TRListener implements Listener {

    @EventHandler
    public void onTRMobSpawn(TRMobSpawnOverEvent event) {
        if (event.getTRMob().ID.equals("com.relatev.minecraft.TRMExample.TestZombie") && event.getSpawnLocation().getY() > 12) {
            Zombie zombie = (Zombie) event.getEntity();
            zombie.setHealth(1D);
        }
    }
}
